Field of the Invention
The present invention generally relates to path rendering and, more specifically, to optimizing triangle topology for path rendering.
Description of the Related Art
Path rendering represents one style of resolution-independent two-dimensional (2D) rendering that forms a basis for a number of important graphics rendering standards known in the art as PostScript, Java 2D, Apple's Quartz 2D, PDF, TrueType fonts, OpenType fonts, PostScript fonts, scalable vector graphics (SVG), OpenVG, Microsoft's Silverlight, Adobe Flash, Microsoft's XML Paper Specification (XPS), and more.
One class of techniques for performing path rendering includes at least a tessellation step and a path coverage step. Path elements are tessellated into representative triangles in the tessellation step. The path coverage step draws many tessellated triangles, and samples covered by these triangles are counted in a stencil or color buffer, which is used to determine whether each sample is inside or outside an associated path. Front-facing triangles increment covered sample counts and back-facing triangles decrement covered sample counts. Samples counted as inside a path are rendered according to an associated path fill color, while samples counted as outside a path are not rendered to the path fill color.
Many common tessellation techniques generate triangle fans and meshes having very narrow, sliver-like triangles, which typically render with relatively poor efficiency. As a consequence, overall path rendering efficiency and performance may be relatively poor, which can diminish the quality of a user experience.
As the foregoing illustrates, what is needed in the art is a technique for improved path rendering efficiency.